package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShopVidoMapper;
import com.ruoyi.system.domain.ShopVido;
import com.ruoyi.system.service.IShopVidoService;

/**
 * 视频Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-03
 */
@Service
public class ShopVidoServiceImpl implements IShopVidoService 
{
    @Autowired
    private ShopVidoMapper shopVidoMapper;

    /**
     * 查询视频
     * 
     * @param vidoId 视频主键
     * @return 视频
     */
    @Override
    public ShopVido selectShopVidoByVidoId(Long vidoId)
    {
        return shopVidoMapper.selectShopVidoByVidoId(vidoId);
    }

    /**
     * 查询视频列表
     * 
     * @param shopVido 视频
     * @return 视频
     */
    @Override
    public List<ShopVido> selectShopVidoList(ShopVido shopVido)
    {
        return shopVidoMapper.selectShopVidoList(shopVido);
    }

    /**
     * 新增视频
     * 
     * @param shopVido 视频
     * @return 结果
     */
    @Override
    public int insertShopVido(ShopVido shopVido)
    {
        shopVido.setCreateTime(DateUtils.getNowDate());
        return shopVidoMapper.insertShopVido(shopVido);
    }

    /**
     * 修改视频
     * 
     * @param shopVido 视频
     * @return 结果
     */
    @Override
    public int updateShopVido(ShopVido shopVido)
    {
        shopVido.setUpdateTime(DateUtils.getNowDate());
        return shopVidoMapper.updateShopVido(shopVido);
    }

    /**
     * 批量删除视频
     * 
     * @param vidoIds 需要删除的视频主键
     * @return 结果
     */
    @Override
    public int deleteShopVidoByVidoIds(Long[] vidoIds)
    {
        return shopVidoMapper.deleteShopVidoByVidoIds(vidoIds);
    }

    /**
     * 删除视频信息
     * 
     * @param vidoId 视频主键
     * @return 结果
     */
    @Override
    public int deleteShopVidoByVidoId(Long vidoId)
    {
        return shopVidoMapper.deleteShopVidoByVidoId(vidoId);
    }
}
